package com.vdong.trade.trading.facade.enums;

/**
 * 交易类型 1：进账 2:出账
 */
public enum UserTypeEnum {

    COMPANY("公司", new Byte("1")),
    MERCHANT("商户", new Byte("2")),
    PUSHER("推客", new Byte("3"));

    private String state;
    private Byte value;

    private UserTypeEnum(String state, Byte value) {
        this.state = state;
        this.value = value;
    }

    public static UserTypeEnum getEnum(int value) {
        for (UserTypeEnum requisitionConstant : UserTypeEnum.values()) {
            if (requisitionConstant.getValue() == value) {
                return requisitionConstant;
            }
        }
        return null;
    }

    public Byte getValue() {
        return value;
    }

    public String getState() {
        return state;
    }
}
